<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			"use strict"
			var xmlhttp = new XMLHttpRequest();
			var xmlFile = "readXML.xml";
			var xmlDoc;
			xmlhttp.open("GET",xmlFile,false);
			xmlhttp.send();
			//Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
			//跨源请求只支持协议模式:http、data、chrome、chrome-extension、https。
			
			//
			console.log(xmlhttp.readyState);
			if(xmlhttp.readyState==4){
				xmlDoc = xmlhttp.responseXML.documentElement;
			}
			var nodeList = xmlDoc.getElementsByTagName("area");// 非IE 
			for(var i = 0;i<nodeList.length;i++){
				//遍历操作
				var attributeValue = nodeList[i].getAttribute("areaid");
			}
			
		</script>
	</body>
</html>